package com.taiji.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.stereotype.Component;

@Data
@ToString
@Component
@AllArgsConstructor //全参
@NoArgsConstructor  //空参
public class CommonResult<T>{

    private Integer code;   //返回数据 状态码
    private String message; // 返回信息
    private T       data;   // 返回数据  404

    public CommonResult(Integer code, String message){
        this(code,message,null);
    }

}